﻿using Microsoft.EntityFrameworkCore;
using WebHome_API.Models.DBModels;

namespace WebHome_API.Models
{
    public class MyContext : DbContext
    {
        protected override void OnConfiguring(DbContextOptionsBuilder optionsBuilder)
        {
            //注入Sql链接字符串
            optionsBuilder.UseSqlServer(@"Data Source=.;Initial Catalog=WebHome;Integrated Security=True;Trust Server Certificate=True");
        }

        public DbSet<Gal_Table> Gals { get; set; }
        public DbSet<FileTag_Table> FileTags { get; set; }
        public DbSet<GalTagEnum_Table> GalTagEnums { get; set; }
        public DbSet<User_Table> Users { get; set; }
        public DbSet<FilePath_Table> FilePaths { get; set; }
        public DbSet<FileTagLink_Table> FileTagLink { get; set; }
        public DbSet<AdminLog_Table> AdminLogs { get; set; }
        public DbSet<OtherEnum_Table> OtherEnums { get; set; }
        public DbSet<Notice_Table> Notice { get; set; }
        public DbSet<Messages_Table> Messages { get; set; }
        public DbSet<Novel_Table> Novels { get; set; }



    }
}
